package com.wh1200.mybatis.xmlless.model.base

import com.wh1200.mybatis.xmlless.model.expression.BoolValue
import com.wh1200.mybatis.xmlless.model.expression.NumberValue
import com.wh1200.mybatis.xmlless.model.expression.StringValue


/**
 *
 * @author 吴昊
 * @date 2023/12/13 9:41
 * @since vv.0.0
 * @version 1.0
 */
abstract class IExpressionToken(
    val start: Int,
    val end: Int
) {


  /**
   * 对象转sql字符串
   */
  abstract fun toSql(): String

  override fun toString(): String {
    return toSql()
  }

  fun isValue(): Boolean {
    return this is StringValue || this is NumberValue || this is BoolValue
  }

}
